package com.logic.modular.act.server;

import io.swagger.annotations.Api;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/serverAct")
@Api(tags = "服务信息")
@Slf4j
public class ServerAction {
    @RequestMapping("/getServerInfo")
    public String getServerInfo() {
        // 获取本应用的端口
        String property = System.getProperty("server.port");
        // 获取ip
        String ip = System.getProperty("server.ip");
        return ip + ":" + property;
    }
}
